// pages/xiecheng/xiecheng.ts
Page({

    /**
     * 页面的初始数据
     */
    data: {
        isGoBottem:false,
        logspages:1,
      headerHeight: 214,
      headerItem: [
        [
          { "title": "酒店", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/hotel.fc17d0f7726132bf2459621923704f0f.png" },
          { "title": "机票", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/flight.2af1e1835a10709db9ad91702e30de35.png" },
          { "title": "火车票", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/train_ticket.62fc76e6f4ffac3d2e4610c807f535bb.png" },
          { "title": "旅游", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/vacation.50ea6db60ea69086791ea507b62364bb.png" },
          { "title": "攻略/景点", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/gs.24c525633ba91ad0a2c41ff96773262b.png" },
          { "title": "民宿/客栈", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/hotel_inn.cbccfdc8449dea7bf83171dfa7ea6f81.png" },
          { "title": "机+酒", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/flight_package.7485a98b650ea13917e3cdd36f3eda67.png" },
          { "title": "汽车/船票", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/bus_ticket.19d2e8eb864288544912b3c1005c9a8e.png" },
          { "title": "门票/活动", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/ticket.e872065047ec929016de33d36e578e49.png" },
          { "title": "购物/置换", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/shop.dba5be1f7b683690ea1d53bdd9ecef8f.png" },
          { "title": "美食", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/food_v2.759e14ab287956e9925f669ec1ef2169.png" },
          { "title": "接送机/包车", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/airport_transfer.fb8d923aefb7393a3485ebcde0888932.png" },
          { "title": "租车", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/car.d343444e248183e0c2ce61894012a327.png" },
          { "title": "周边游", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/weekend.b327d041f73dd403971831a874eb25e9.png" },
          { "title": "借钱/分期", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/finance.5cd5a7a955c6e5c633e6ae4e2b6cd551.png" }]
        ,
        [
          { "title": "一日游", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/hpgs_guide.c4c7aa66032ef995136fb5d92a1cc9da.png" },
          { "title": "向导/包车", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/insurance.ec149a1dec5e6803f2b88290c99fa56c.png" },
          { "title": "微领队", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/vtm.4b7ff6bddd0b21f3e92d1fa1ec41a0dc.png" },
          { "title": "一日游", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/oneday.4fac0806c732ddc0e37d56969f92d2f3.png" },
          { "title": "定制游", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/custom.56a6b6db26e37f09ebc593c1ac6d13c1.png" },
          { "title": "游轮", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/cruise.e66cd5e4d0759b090142a5f84c9d7896.png" },
          { "title": "外币兑换", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/exchange.17e163edbb0d53ee73743092dac0bba9.png" },
          { "title": "签证", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/exchange.17e163edbb0d53ee73743092dac0bba9.png" },
          { "title": "WiFi电话卡", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/wifi.ac1863182c3866811836d375eb4d20e5.png" },
          { "title": "旅拍·跟拍", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/lvpai.09b76db1c3e096b532ba90325c9dd0b9.png" },
          { "title": "航班助手", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/flight_schedule.cef3ed6d45a8723efb4a95ec7d5312aa.png" },
          { "title": "拿去花", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/cost.1373427f7b26bd92ef1d413dbacdc096.png" },
          { "title": "礼品卡", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/credit_card.eea3d6c0fb749362a6418cdbd24888f7.png" },
          { "title": "信用卡", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/weekend.b327d041f73dd403971831a874eb25e9.png" },
          { "title": "会员/签到", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/member.c5624f964f3892da2c01d996e5233007.png" },
          { "title": "超值旅行家", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/supermember.fb6d01eb5298141f0bc572cd94154df1.png" },
          { "title": "会员商城", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/rewards.c1302d78d8094c78a9768aa6b578dddb.png" },
          { "title": "携程小诗机", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/xiaoshiji.1c6588a11feef97907e952edcc4e5480.png" },
          { "title": "紧急支援", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/sos.20c13da52f8ff660f5b6807a799b03b3.png" },
          { "title": "加盟合作", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/cooperation.1f11ba99b09bfc288449ac23e253671a.png" },
          { "title": "会展旅游", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/mice.87b43913b744f893b4f9493986046f8f.png" },
          { "title": "企业差旅", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/corpctrip.02c3555f8f7609e02373ac87ce71e016.png" },
          { "title": "Trip.com", "icon": "https://bd-s.tripcdn.cn/modules/basebiz/h5home/trip.4fc7db341a13af5153b3a5ebaa965b72.png" },
          { "title": "关怀版", "icon": "	https://bd-s.tripcdn.cn/modules/basebiz/h5home/aria.9829d112261a461b876f0de6c348cb57.png" }
        ]
  
      ],
      bannerItem: {
        "leftBannerItem": [
          { type: '酒店套餐', image: 'https://images4.c-ctrip.com/target/0205h120008m1dfqmD3EB_D_280_280_R5.jpg', title: '上海外滩璞硯酒店2晚', price: '1399' },
          { type: '特价套餐', image: 'https://images4.c-ctrip.com/target/0AD6s120008wr37y87F82_D_280_280_R5.jpg', title: '扬州迎宾馆3晚', price: '2799' },
          { type: '自费套餐', image: 'https://images4.c-ctrip.com/target/1mc3k12000div9mjlD138_D_280_280_R5.jpg', title: '舟山·云海湾智能酒店（朱家尖保利自在海乐园普陀山蜈蚣峙码头店）2晚', price: '258' }
        ], "rightBannerItem": [
          { position: '上海', image: 'https://dimg04.c-ctrip.com/images/0102o12000a0gfvkdFBB5_R_238_268.jpg', title: '周边奢华酒店榜' },
          { position: '北京', image: 'https://images4.c-ctrip.com/target/0AD6s120008wr37y87F82_D_280_280_R5.jpg', title: '奢华酒店榜' },
        ]
      },
      logsItem: [
        {
          "systemType": "admin",
          "image": "https://dimg04.c-ctrip.com/images/1me3412000ejv9ss58CAB_R_640_10000_Q90.jpg",
          "type": "images",
          "position": "上海陆家嘴万信R酒店",
          "titile": "在上海住到了宝藏酒店！太舒服了😌",
          "admin": { "fontcolor":"#ae6e15","color": "#fdefd2", "logo": "https://dimg04.c-ctrip.com/images/0AS64120009k1ouumABBE.png", "logoText": "https://dimg04.c-ctrip.com/images/0AS2z120009k1p6py8436.png", "bgImage": "https://dimg04.c-ctrip.com/images/0AS4u120009k1p2p9C257.png", "title": "4亿旅行者的口碑之选" },
          "userinfo": {}
        },
        {
          "systemType": "user",
          "image": "https://dimg04.c-ctrip.com/images/1me1k12000elzaytj5ACD_R_640_10000_Q90.jpg",
          "type": "Video",
          "position": "上海陆家嘴万信R酒店",
          "titile": "在上海住到了宝藏酒店！太舒服了😌",
          "admin": {},
          "userinfo": { "userImage": "https://dimg04.c-ctrip.com/images/0Z80m12000dz4wiyi2D0D_C_180_180.jpg", "username": "星仔体验酒店", "goods": "1984" }
        },
        {
          "systemType": "user",
          "image": "https://dimg04.c-ctrip.com/images/1me4t12000em0aq640C60_R_640_10000_Q90.jpg",
          "type": "Video",
          "position": "上海陆家嘴万信R酒店",
          "titile": "在上海住到了宝藏酒店！太舒服了😌",
          "admin": {},
          "userinfo": { "userImage": "https://dimg04.c-ctrip.com/images/0Z80m12000dz4wiyi2D0D_C_180_180.jpg", "username": "星仔体验酒店", "goods": "1984" }
        },
        {
          "systemType": "user",
          "image": "https://dimg04.c-ctrip.com/images/1me1112000ekrh0qh758E_R_640_10000_Q90.jpg",
          "type": "Video",
          "position": "上海陆家嘴万信R酒店",
          "titile": "在上海住到了宝藏酒店！太舒服了😌",
          "admin": {},
          "userinfo": { "userImage": "https://dimg04.c-ctrip.com/images/0Z80m12000dz4wiyi2D0D_C_180_180.jpg", "username": "星仔体验酒店", "goods": "1984" }
        },
        {
          "systemType": "user",
          "image": "https://dimg04.c-ctrip.com/images/1me1112000ekrh0qh758E_R_640_10000_Q90.jpg",
          "type": "Video",
          "position": "上海陆家嘴万信R酒店",
          "titile": "在上海住到了宝藏酒店！太舒服了😌",
          "admin": {},
          "userinfo": { "userImage": "https://dimg04.c-ctrip.com/images/1me3j12000ehptihl8276_R_640_10000_Q90.jpg", "username": "星仔体验酒店", "goods": "1984" }
        },
        {
          "systemType": "admin",
          "image": "https://dimg04.c-ctrip.com/images/1me2812000emexw8jB335_R_640_10000_Q90.jpg",
          "type": "play",
          "position": "上海陆家嘴万信R酒店",
          "titile": "在上海住到了宝藏酒店！太舒服了😌在上海住到了宝藏酒店！太舒服了😌在上海住到了宝藏酒店！太舒服了😌在上海住到了宝藏酒店！太舒服了😌在上海住到了宝藏酒店！太舒服了😌",
          "admin": { "fontcolor":"#1c8debe0","color": "skyblue", "logo": "https://dimg04.c-ctrip.com/images/0AS2b120009eaj4qkFDA1.png", "logoText": "https://dimg04.c-ctrip.com/images/0AS56120009eaj7zs183E.png", "bgImage": "https://dimg04.c-ctrip.com/images/0AS2v120009eainsa328F.png", "title": "特价好货低价抢" },
          "userinfo": { "userImage": "https://dimg04.c-ctrip.com/images/0Z80m12000dz4wiyi2D0D_C_180_180.jpg", "username": "星仔体验酒店", "goods": "1984" }
        },
        {
          "systemType": "admin",
          "image": "https://dimg04.c-ctrip.com/images/1me1k12000elzaytj5ACD_R_640_10000_Q90.jpg",
          "type": "play",
          "position": "上海陆家嘴万信R酒店",
          "titile": "在上海住到了宝藏酒店！太舒服了😌在上海住到了宝藏酒店！太舒服了😌在上海住到了宝藏酒店！太舒服了😌在上海住到了宝藏酒店！太舒服了😌在上海住到了宝藏酒店！太舒服了😌",
          "admin": { "fontcolor":"#1c8debe0","color": "skyblue", "logo": "https://dimg04.c-ctrip.com/images/0AS2b120009eaj4qkFDA1.png", "logoText": "https://dimg04.c-ctrip.com/images/0AS56120009eaj7zs183E.png", "bgImage": "https://dimg04.c-ctrip.com/images/0AS2v120009eainsa328F.png", "title": "特价好货低价抢" },
          "userinfo": { "userImage": "https://dimg04.c-ctrip.com/images/0Z80m12000dz4wiyi2D0D_C_180_180.jpg", "username": "星仔体验酒店", "goods": "1984" }
        },
        {
          "systemType": "admin",
          "image": "https://dimg04.c-ctrip.com/images/1me3412000ejv9ss58CAB_R_640_10000_Q90.jpg",
          "type": "images",
          "position": "上海陆家嘴万信R酒店",
          "titile": "在上海住到了宝藏酒店！太舒服了😌",
          "admin": { "fontcolor":"red","color": "pink", "logo": "https://dimg04.c-ctrip.com/images/0AS4n120009eainsc98AB.png", "logoText": "https://dimg04.c-ctrip.com/images/0AS6m120009eaj47c0D49.png", "bgImage": "https://dimg04.c-ctrip.com/images/0AS4p120009eair3bE29D.png", "title": "特价好货低价抢" },
          "userinfo": {}
        }
      ]
    },
    headerswiperchange(e: any) {
      let headerHeight = 214;
      if (e.detail.current == 1)
        headerHeight = 326;
      this.setData({ headerHeight });
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad() {
  
    },
  
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {
  
    },
  
    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {
  
    },
  
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {
  
    },
  
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {
  
    },
  
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {
  
    },
  
    /**
 * 页面上拉触底事件的处理函数
 */
onReachBottom() {
    // 如果已经显示过没有更多内容，则不再执行加载
    if (this.data.isGoBottem) {
        return;
    }

    wx.showLoading({
        title: '正在加载'
    });
    setTimeout(() => {
        let pageIndex = this.data.logspages;
        let logsItemLength = this.data.logsItem.length;

        if (pageIndex * 4 >= logsItemLength) {
            wx.showModal({
                title: '提示',
                content: '已经没有更多内容',
                showCancel: false
            });
            // 控制页面显示“没有任何内容”
            this.setData({
                isGoBottom: true
            });
        } else {
            this.setData({
                logspages: pageIndex + 1
            });
        }
        wx.hideLoading();
    }, 500);
},
  
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {
  
    }
  })